  <style>    
    #testFileInput2{
        height: 30px; width: 102px; margin-left: 128px;
    }
    #preview1, #topPhpto
        {  
            width:150px;  
            padding-left: 65px;padding-top: 15px; border-top-width: 5px;
            //height:150px;  
        }
</style>
<script src="<{$Think.const.JS_URL}>imgbox.js"></script>
<div class="pageContent" style="width:800px;height:600px">	
    <form method="post" action="__MODULE__/Topphoto/edit?callbackType=closeCurrent" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
        <input type='hidden' name='id' value="<{$photo['id']}>"/>
        <input type='hidden' name='image' value="<{$photo.image}>" id='img1'/>
        <div class="pageFormContent" layoutH="58">
            <div class="unit">
                <label>图片名：</label>
                <input type="text" name="name" size="15" minlength="1" maxlength="15" class="required" value="<{$photo.name}>"/>
            </div> 
            <div id="preview1" href=""><img src="<{$Think.const.PUBLIC_URL}>upload/<{$photo.image}>" id='topPhpto'/></div>
            <div class="unit">
                <label>上传图片：</label>  
                <input id="testFileInput2" type="file" name="images"                                        
                    uploaderOption="{
			swf:'<{$Think.const.DWZ_URL}>uploadify/scripts/uploadify.swf',
			uploader:'__CONTROLLER__/upPhoto&aid=<{$Think.session.ad_image}>',
                        formData:{authId:<?php echo $_SESSION['authId'];?>, ajax:1},
			buttonText:'请选择文件',
			fileSizeLimit:'20000KB',
			fileTypeDesc:'*.jpg;*.jpeg;*.gif;*.png;',
			fileTypeExts:'*.jpg;*.jpeg;*.gif;*.png;',
			auto:true,
                        onUploadSuccess:function(file,data,respore){
                            $('#topPhpto').attr('src','<{$Think.const.PUBLIC_URL}>'+'upload/'+data);
                            $('#img1').val(data);
                        }
                    }"
                />
            </div>
            <div class="unit">
                <label>广告类别：</label>
                <select class="" name="type"  style="width: 101px;">
                    <option value='1'>首页广告</option>
                    <option value='2'>涂百科广告</option>
                    <option value='3'>涂原料广告</option>
                    <option value='4'>涂工具广告</option>
                </select>
            </div>
            <div class="unit">
                <label>图片链接：</label>
                <input type="text" name="contentUrl" size="15" value="<{$photo.contenturl}>"/>
            </div>
        </div>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
            </ul>
        </div>
    </form>	
</div>